package net.dgg.zz.credential.baseCredential.dao;


import net.dgg.zz.credential.baseCredential.entity.BaseCredential;
import net.dgg.zz.credential.generalCredential.entity.GeneralCertificate;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface BaseCredentialDao {
    int deleteByPrimaryKey(Long id);

    int insert(BaseCredential record);

    int insertSelective(BaseCredential record);

    BaseCredential selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BaseCredential record);

    int updateByPrimaryKeyWithBLOBs(BaseCredential record);

    int updateByPrimaryKey(BaseCredential record);

    /**
     * 根据证书编号查询证书数据
     * @param params
     * @return
     */
    BaseCredential findCredentialByNo(Map params);

    /*
     * @Author zsx
     * @Date 2018-09-14 07:09:46
     * @Description    查询所有资质同一编号类容
     */
    List<BaseCredential> findAllCredentialByNo(Map params);

    /**
    * <p>@Description 根据证书id得到组合的编码</p>
    * <p>@author mqy</p>
    * <p>@Time 2018/8/30 0030 14:07 创建时间</p>
    * <p>@return</p>
    */
    Map queryCodesByCertificateId(Map params);

    /**
    * <p>@Description 主要用于根据生产订单ID查相关的证书和资质</p>
    * <p>@author mqy</p>
    * <p>@Time 2018/8/31 0031 15:03 创建时间</p>
    * <p>@return</p>
    */
    List<Map> queryStatusAllByMap(Map params);

    /**
     * <p>@Description 主要用于根据生产订单ID查相关的证书和资质</p>
     * <p>@author mqy</p>
     * <p>@Time 2018/8/31 0031 15:03 创建时间</p>
     * <p>@return</p>
     */
    List<BaseCredential> findCredentialListByScOrderId(Map params);

    List<BaseCredential> queryGertificateByAddScOrderId(Long id);

    List<GeneralCertificate> findCertificateByScOrderId(Map params);
}